<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::group([ 'prefix' => 'qiniu' ], function(){
    // 获取上传文件的token
    Route::get('/', 'QiniuController@getUpToken');
    // 获取七牛文件的url
    Route::get('/url', 'QiniuController@getFileUrl');
});

Route::get('/', function () {
    return view('welcome');
});

Route::group(['namespace' => 'View\Front'],function(){
	require_once('Routes/View/Front/Case.php');
});

Route::group(['prefix' => 'api/front','namespace' => 'Api\Front'],function(){
	require_once('Routes/Api/Front/Submit.php');
});

Route::group(['prefix' => 'api/admin','namespace' => 'Api\Admin'],function(){
	require_once('Routes/Api/Admin/Customer.php');
	Route::group(['middleware' => 'auth'],function(){
		require_once('Routes/Api/Admin/Admin.php');
		require_once('Routes/Api/Admin/Case.php');
		require_once('Routes/Api/Admin/Address.php');
		require_once('Routes/Api/Admin/Set.php');
	});
});

Route::group(['prefix' => 'admin','namespace' => 'View\Admin'],function(){
	require_once('Routes/View/Admin/Login.php');
	Route::group(['middleware' => 'auth'],function(){
		require_once('Routes/View/Admin/Case.php');

		require_once('Routes/View/Admin/Account.php');

		require_once('Routes/View/Admin/CaseType.php');

		require_once('Routes/View/Admin/Level.php');

		require_once('Routes/View/Admin/Log.php');
		require_once('Routes/View/Admin/Set.php');

		require_once('Routes/View/Admin/Submit.php');
	});
	
});
